Carbon


AddFolderRouting

Header: Folders.h Carbon status: Supported

Adds a folder routing structure to the global routing list.

OSErr AddFolderRouting (
    OSType fileType, 
    FolderType routeFromFolder, 
    FolderType routeToFolder, 
    RoutingFlags flags, 
    Boolean replaceFlag
);
Parameter descriptions
fileType

Pass the OSType of the file to be routed.

routeFromFolder

Pass the folder type of the “from” folder; see “Folder Type Constants” for descriptions of possible values. An item dropped on the folder specified in this parameter will be routed to the folder specified in the routeToFolder parameter.

routeToFolder

The folder type of the “to” folder; see “Folder Type Constants” for descriptions of possible values.

flags

Reserved for future use; pass 0.

replaceFlag

Pass a Boolean value indicating whether you wish to replace a folder routing that already exists. If true, it replaces the folder to which the item is being routed. If false, it leaves the folder to which the item is being routed.

function result

A result code. The result code duplicateRoutingErr indicates that a folder routing is already installed with the specified folder type and replaceFlag is false.

DISCUSSION

Your application can use the AddFolderRouting function to specify how the Finder routes a given file type.

VERSION NOTES

This function is supported under Mac OS 8.5 and later.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)